﻿
function layermsg(msg) {
    var length = msg.length;
    msg = "<i class='fa fa-check-circle'></i><p style='margin-left:50px; font:bold 26px/30px 宋体; white-space: nowrap; word-break: keep-all; color:#fff;'>" +
        msg +
        "</p>";
    var option = {
        title: false,
        btn: false,
        closeBtn: false,
        content: msg,
        shade: false,
        skin: "layer-skin-green", //"layer-skin-red"
        time: 1500
    };
    var width = length * 30 + 60;
    option.area = width + "px";
    layer.open(option);

    return;
    msg = "<span style=\"font-size:16px;\">" + msg + "</span>";
    layer.msg(msg,
        {
            icon: 1,
            title: ["温馨提示", "font-size:18px; color:red; text-align:center;"],
            btnAlign: 'c'
        });
}

function layerconfirm(msg) {
    return layer.open(
        {
            title:false,
            type: 1,
            closeBtn: false,
            skin: "layer-skin-raduis",
            content: msg
        });
}

function layererr(msg) {
    var length = msg.length;
    msg = "<i class='fa fa-times-circle-o'></i><p style='padding-left: 50px; display:inline-block; white-space: nowrap; font:bold 26px/30px 宋体; display:block; width: auto; color:#fff;'>" +
        msg +
        "</p>";
    var option = {
        title: false,
        btn: false,
        closeBtn: false,
        content: msg,
        shade: false,
        skin: "layer-skin-green",
        time: 1500
    };
    var width = length * 30 + 60;
    option.area = width + "px";
    layer.open(option);
};

function layload(msg, time) {
    if (time === undefined) {
        time = 50000;
    }
    return layer.open(
        {
            title:false,
            content: "<span style=' font:bold 26px/25px 宋体;'>" + msg+"</span>",
            closeBtn: false,
            skin: "layer-skin-raduis",
            btn: "",
            icon: 16,
            shade: 0.01,
            time: time
        });
}

function loadin() {
    window.layerindex = window.layload("加载中...");
}